home *** CD-ROM | disk | FTP | other *** search
Visual Basic class definition | 1999-08-20 | 2.1 KB | 66 lines |
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- Persistable = 0 'NotPersistable
- DataBindingBehavior = 0 'vbNone
- DataSourceBehavior = 0 'vbNone
- MTSTransactionMode = 0 'NotAnMTSObject
- END
- Attribute VB_Name = "ExampleService"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = True
- Attribute VB_PredeclaredId = False
- Attribute VB_Exposed = True
- '****************************************************************************************************
- ' Copyright (c) Key Technology Pty Ltd 1999, All Rights Reserved.
- ' Web site: http://www.keytech.com.au Email: info@keytech.com.au
- '****************************************************************************************************
-
- Option Explicit
-
- '
- ' This is a stub service that does nothing.
- '
-
- ' Must implement IService to be hosted as a service
- Implements IService
-
- Private Property Get IService_Pausable() As Boolean
- ' Only support pause/continue if it makes sense
- IService_Pausable = True
- End Property
-
- Private Sub IService_OnStart()
- App.LogEvent "Example Service starting", vbLogEventTypeInformation
-
- ' Do whatever is required to start the service
- ' but return as quickly as possible
- End Sub
-
- Private Sub IService_OnStop()
- App.LogEvent "Example Service stopping", vbLogEventTypeInformation
-
- ' Do whatever is required to stop the service
- ' but return as quickly as possible
- End Sub
-
- Private Sub IService_OnPause()
- ' Will only be called if pausable
- App.LogEvent "Example Service pausing", vbLogEventTypeInformation
- End Sub
-
- Private Sub IService_OnContinue()
- ' Will only be called if pausable
- App.LogEvent "Example Service continuing", vbLogEventTypeInformation
- End Sub
-
- Private Sub IService_OnControl(ByVal OpCode As Long)
- ' Handle service specific controls
- App.LogEvent "Example Service received control " & OpCode, vbLogEventTypeInformation
- End Sub
-
- Private Sub IService_OnShutdown()
- ' Perform any shutdown specific processing
- App.LogEvent "Example Service shutting down", vbLogEventTypeInformation
- End Sub
-